* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    outline: none;
}

html,
body {
    width: 100vw;
    height: 100vh;
    background-color: #1c1d22;
    font-size: 16px;
}

.menu {
    margin: 10rem auto;
    width: 80%;
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
}

.menu-item {
    width: 10rem;
    height: 4rem;
    line-height: 4rem;
    text-align: center;
    list-style-type: none;
}

.menu-item a {
    display: block;
    width: 100%;
    height: 100%;
    color: #777;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    /* z-index: 1; 保持水波纹在其他内容之上 */
    text-shadow: 
        0 0 2px #ff0000,
        0 0 4px #ff7f00,
        0 0 6px #ffff00,
        0 0 8px #00ff00,
        0 0 10px #0000ff,
        0 0 12px #8b00ff;
    font-size: 2rem;
}

.menu-item a:hover {
    color: #fff;
    cursor: pointer;
    font-weight: 700;
    text-shadow: 
        0 0 4px #ff0000,
        0 0 6px #ff7f00,
        0 0 8px #ffff00,
        0 0 10px #00ff00,
        0 0 12px #0000ff,
        0 0 14px #8b00ff;
}

.menu-item a::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    background: #2098D1;
    width: 0%;
    height: 0.2rem;
}

@property --bgcolor {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

.menu-item a:hover::before {
    background: #fff;
    width: 100%;
    background: linear-gradient(var(--bgcolor), #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #8b00ff);
    animation: ani-bgcolor 0.3s linear infinite;
}

@keyframes ani-bgcolor {
    
    to {
        --bgcolor: 360deg;
    }
  }
  